package MsgSystem;

import java.io.Serializable;
import java.util.ArrayList;

//ImpGenericMessage class create a GenericMessage and fill its content and get it too. 
public class ImpGenericMessage implements Serializable, GenericMessage {

    String destination, source, keyValue, messageType,ontology, searchType, request, sourceContent;
    ArrayList resultContent=null;
    ImpSearchProfile isp=null;
    ImpSearchResult isr= null;
    ImpUserContent iuc= null;
    
    public ImpGenericMessage() {
    }
    
    public void setSearchProfile(ImpSearchProfile isp){
        this.isp=isp;
        this.messageType=isp.getMessageType();
    }

    public void setSearchResult(ImpSearchResult isr){
        this.isr=isr;
        this.messageType=isr.getMessageType();
    }

    public void setUserContent(ImpUserContent iuc){
       this.iuc=iuc;
       this.messageType=iuc.getMessageType();
    }

    public ImpSearchProfile getSearchProfile(){
        return isp;
    }

    public ImpSearchResult getSearchResult(){
        return isr;
    }

    public ImpUserContent getUserContent(){
        return iuc;
    }
    
       
    public void setSource(String source){
        this.source=source;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }
           
    public String getSource() {
        return source;
    }

    public String getDestination() {
        return destination;
    }
    public String getMessageType(){
        return messageType;
    }
}
